package com.alliky.common.api

import com.alliky.common.entity.BannerEntity
import com.alliky.common.entity.BaseResponse
import com.alliky.common.entity.User
import io.reactivex.Observable
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.POST

interface ApiService {
    @POST("api/user/login")
    @FormUrlEncoded
    fun login(
        @Field("username") username: String,
        @Field("password") password: String
    ): Observable<BaseResponse<User>>

    @POST("api/advert/list")
    @FormUrlEncoded
    fun getBanner(@Field("type") type: Int): Observable<BaseResponse<List<BannerEntity>>>

}